package asteroids.expressions;

import java.util.*;

import be.kuleuven.cs.som.annotate.Basic;

import asteroids.Ship;
import asteroids.types.Type;

public abstract class Expression {

	private int lineNumber;
	private int columnNumber;
	
	protected Expression(int line, int column) {
		this.lineNumber = line;
		this.columnNumber = column;
	}

	@Basic
	public int getLine() {
		return lineNumber;
	}
	
	@Basic
	public int getColumn() {
		return columnNumber;
	}
	
	public abstract Type evaluate(Ship ship, Map<String, Type> globals);
	
	public abstract boolean hasAsSubExpression(Expression expression);
	
	public abstract List<String> getTypeCheckErrorsExpressions(List<String> typeErrors, Map<String, Type> globals);
	
}
